using Godot;
using System;

namespace Box.GameCore {
    [RegisterBaseType("Entity")]
    public interface IEntity {
        public T GetNode<T>(NodePath path) where T : class;
        public T GetNodeOrNull<T>(NodePath path) where T : class;
        public T GetComponent<T>(Type comp_type) where T : Node,IComponent {
            string comp_name = comp_type.Name;
            T node = GetNodeOrNull<T>(comp_name);
            if(node == null) return null;
            return node;
        }
    }
}